package aicue1.services;

import aicue1.beans.Customer;
import aicue1.beans.Item;
import aicue1.beans.Order;
import aicue1.soapfaults.ItemUnavailableFault;
import aicue1.soapfaults.UnknownCustomerFault;
import aicue1.soapfaults.UnknownItemFault;
import aicue1.soapfaults.UnknownOrderFault;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

@WebService(name = "OrderManagementService")
public interface OrderManagementService
{
    @WebMethod(operationName="check_availability")
    public boolean check_availability( @WebParam(name = "item") Item item) throws UnknownItemFault;

    @WebMethod(operationName="place_order")
    public Order place_order( @WebParam(name = "items") Item[] items, @WebParam(name = "customer") Customer customer) throws UnknownItemFault,ItemUnavailableFault;

    @WebMethod(operationName="is_finished")
    public boolean is_finished( @WebParam(name = "order") Order order) throws UnknownOrderFault;

    @WebMethod(operationName="insert_test_data")
    public void insert_test_data();
}